//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using OpenLS.Drawing;

namespace OpenLS.Chart.UI
{
    public class ThemeConverter: IMultiValueConverter
    {
        #region IMultiValueConverter Members

        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            foreach (object v in values)
            {
                object value = v;
                if (value != null && value != DependencyProperty.UnsetValue)
                    return value;
            }
            return BuiltInThemes.DefaultTheme ; 
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}
